<div class="pl20 pr20 pt20">
	<form name="biz_ct_order_cancel_from" id="biz_ct_order_cancel_from">
		<table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td style="width:40px">原因：</td>
				<td><textarea name="order_tip" style="width:94%;height:80px" class="f-text"></textarea></td>
			</tr>
			<tr>
				<td colspan="2" style="text-align:center;">
					<div class="blank"></div>
					<span class="grebtn grebtn_s lh22">
	                    <i class="green_line"></i>
	                    <strong class="grebtn_in"><a href="javascript:void(0);" id="sure_cancel_ct_btn" class="grebtn_bg">确定</a></strong>
	                    <i class="green_line"></i>
	                </span>
				</td>
			</tr>
		</table>
		<input type="hidden" value="{$order_id}" name="order_id" />
	</form>
</div>
<script type="text/javascript">
	jQuery(function(){
		$("#sure_cancel_ct_btn").bind("click",function(){
			if($.trim($("#biz_ct_order_cancel_from textarea[name='order_tip']").val())==""){
				$.showErr("请输入撤销订单原因！",function(){
					$("#biz_ct_order_cancel_from textarea[name='order_tip']").focus();
				});
				
				return false;
			}
			if(confirm("确定撤销订单吗？")){
				var query = $("#biz_ct_order_cancel_from").serialize();
				$.ajax({
					url:APP_ROOT + "/biz.php?ctl=ctorder&act=do_cancel",
					data:query,
					type:"post",
					cache:false,
					dataType:"json",
					success:function(result){
						if(result.status==1)
						{
							window.location.reload();
						}
						else{
							$.showErr(result.message);
						}
					}
				});
			}
			else{
				$.weeboxs.close();
			}
			return false;
		});
	});
</script>